package education;

enum SexType{
	male,female
}
public class Person {
	String profession;
	String name="张三";
	int age=20;
	SexType sex=SexType.female;
	public void printInfo() {
		System.out.println("我叫"+name+",我" + age +"岁了，我是" + (sex==SexType.male?"男的":"女的"));
	}
	//有参构造不能默认调用
	public Person(String n, String p) {
		name = n;
		profession=p;
		System.out.println("Person constructor called!");
	}
	

}
